'use strict';
/*
 * 生产环境配置参数
 */
module.exports = appInfo => {

  const config = exports = {};

  console.log('环境参数:', appInfo.env);

  // 数据库 开发环境=
  config.mysql = {
    client: {
      host: 'rm-k2j0x9a43vod4v2ve.mysql.zhangbei.rds.aliyuncs.com',
      port: '3306',
      user: 'morefun',
      password: 'GuE0RcRDzY66TN21',
      database: 'm_m_d',
      timezone: '+08:00' //东八区
    },
    app: true,
    agent: false,
  };

    // mongodb 西安 开发环境，
    config.mongoose = {
      client: {
        url: 'mongodb://192.168.0.233:27017/', // 你的数据库地址，mfmongodb是你数据库得名字
        options: {
          dbName: 'mfmongodb',
          useUnifiedTopology: true,
        },
      },
    };

  // redis 开发环境，
  config.redis = {
    client: {
      port: 6379, // Redis port
      host: 'r-k2jnhb8f4okcix0ptc.redis.zhangbei.rds.aliyuncs.com', // Redis host
      password: 'WoDGXOxKR221w45W',
      db: 2,
    },
  };

  // log目录
  config.logger = {
    consoleLevel: 'DEBUG',
    dir: '/acs/log',
  };

  // 端口
  config.cluster = {
    listen: {
      path: '',
      port: 8080,
      hostname: '0.0.0.0',
    },
  };

  return {
    ...config,
  };
};
